from plotter import *
import os

file = os.path.join(WORKDIR, 'gowalla', 'stats',
    'gowalla_degree_distribution.txt')

x,y,c = [],[],[1.0]
values = []
for line in open(file):
    deg,freq,acc = map(float,line.strip().split())
    values.extend([deg]*int(freq))
    x.append(deg)
    y.append(freq)
    c.append(acc)
x = np.array(x)
y = np.array(y)
c = np.array(c[:-1])
tot_y = sum(y)
y = y/tot_y

p = Plotter(values)
p.fit_plot('gowalla_dist_degree')

